<?php 
class Application_Model_Track extends Application_Model_DomainObject {
    
    protected $_id;
    
    protected $_type; //跟踪类型

    protected $_glId; //关联Id
    
    protected $_dateCreated;//创建时间
        
    protected $_operator;//添加人
    
    protected $_content;//内容
    
    protected $_isDel;  //是否删除

    /**
     * 国际运单
     */
    const Type_BillWay = 1;
    /**
     * 代购订单
     */
    const Type_Order = 2;
   

    public static function getTypeAll()
    {
        return array(
            self::Type_BillWay => "国际运单"
            , self::Type_Order => "代购订单"
        );
    }
    
    public function getTypeName()
    {
        $arrType = self::getTypeAll();
        return $arrType[$this->_type];
    }
    
    public static function getByTypeId($type,$id)
    {
        return self::getDao()->queryAll(array("(isDel is null or isDel = "=>0," ) and type = "=>$type," and glId = "=>$id));
    }
}